# Maintainer: Kyle Keen <keenerd@gmail.com>

pkgname=python-curtsies
_pkgname=curtsies
pkgver=0.4.1
pkgrel=2
pkgdesc="Curses-like terminal wrapper with a display based on compositing 2d arrays of text"
arch=('any')
url="https://pypi.python.org/pypi/curtsies"
license=('MIT')
depends=('python-blessed' 'python-cwcwidth')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/c/curtsies/curtsies-$pkgver.tar.gz")
sha256sums=('62d10f349c553845306556a7f2663ce96b098d8c5bbc40daec7a6eedde1622b0')

prepare() {
  # 0.3.0 bug?
  cd "$srcdir/curtsies-$pkgver"
  sed -i 's/^.*typing.*$//' curtsies.egg-info/requires.txt setup.py
}

build() {
  cd "$srcdir/curtsies-$pkgver"
  python3 setup.py build
}

package() {
  cd "$srcdir/curtsies-$pkgver"
  python3 setup.py install --root="$pkgdir/" --prefix=/usr --optimize=0
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/python-curtsies/LICENSE"
}
